<!-- 用户 》 账号 -->

<template>
  <div>
    <EasyDivider text="账号信息" />

    <EasyRow>
      <FormPhoto label="头像" bind="photo" folder="demo" noLabel row3 quar required />

      <EasyRow class="quar3">
        <FormInput label="登录账号" bind="account" :max="20" sixth5 required />
        <FormSwitch label="状态" bind="status" word2 sixth required />

        <FormInput label="登录密码" bind="password" :max="20" />
        <FormInput label="确认密码" bind="password2" :max="20" />
      </EasyRow>
    </EasyRow>

    <EasyRow col2>
      <FormTimeRange label="有效期限" bind="activeTime, expireTime" required />
      <FormSlot noLabel>
        <div class="col2">
          <FormTime label="开始时间" bind="activeTime" :disabled="!one.activeTime" history noLabel required />
          <FormTime label="结束时间" bind="expireTime" :disabled="!one.expireTime" future noLabel required />
        </div>
      </FormSlot>
    </EasyRow>

    <EasyRow flex>
      <!-- 既保存角色 ID，也保存角色名称 -->
      <FormSelect label="关联角色" bind="roleId, roleName" :dict="role_selectDict" hasRight required />
      <FormSlot noLabel flex2>
        <div class="flexCC">
          <FormSelectMulti label="多角色" bind="rolesIdList, rolesNameList" :dict="role_selectDict" hasRight word3 />
          <BtnDefault title="选择" :disabled="isShow" @click="sub_openEdit" />
        </div>
      </FormSlot>
    </EasyRow>
  </div>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'UserAccount',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb(), CORE.mixSelect('role', 'role_'), CORE.mixWeb('sub', 'sub_')],
}
</script>
